package baseFx.database.query;

import baseFx.common.Func1T;

import java.util.*;

public class SetIn<T> {
    private Class<T> table;
    private Map<String, List> sets = new LinkedHashMap<>();

    public SetIn(Class<T> clazz) {
        this.table = clazz;
    }

    public final Map<String, List> getSets() {
        return sets;
    }

    public void set(Func1T<T, Object> func, Object... args) {
        ChooseField<T> cf = new ChooseField<>(table);
        cf.choose(func);
        sets.put(cf.getChooses().get(0).getName(), Arrays.asList(args));
    }
}
